//涉及到控制对话框等显示隐藏的逻辑都可以用这个钩子
import { useState } from 'react';
export function useDialog() {
  const [visible, setVisible] = useState(false);
  const showDialog = () => {
    setVisible(true);
  };
  const closeDialog = () => {
    setVisible(false);
  };
  return [visible, showDialog, closeDialog];
}
